From 354ed627425c85f9041e03880362e2043d57298c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Wed, 24 Sep 2025 15:42:02 +0200 Subject: [PATCH] dhcpv4: move the remaining forward declaration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Down to where it is clearer why it is needed (there's a circular dependency between dhcpv4_fr_delay_timer() and dhcpv4_fr_rand_delay()). Signed-off-by: David Härdeman Link: https://github.com/openwrt/odhcpd/pull/264 Signed-off-by: Álvaro Fernández Rojas --- src/dhcpv4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dhcpv4.c b/src/dhcpv4.c index a09c460..0416bae 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -40,8 +40,6 @@ DHCPV4_MIN_PACKET_SIZE : (uint8_t *)end - (uint8_t *)start) #define MAX_PREFIX_LEN 28 -static void dhcpv4_fr_rand_delay(struct dhcp_assignment *a); - static uint32_t serial = 0; struct odhcpd_ref_ip { @@ -270,6 +268,8 @@ static void dhcpv4_fr_start(struct dhcp_assignment *a) dhcpv4_fr_send(a); } +static void dhcpv4_fr_rand_delay(struct dhcp_assignment *a); + static void dhcpv4_fr_delay_timer(struct uloop_timeout *event) { struct dhcp_assignment *a = container_of(event, struct dhcp_assignment, fr_timer); -- 2.30.2